package com.wswy.wzcx.ui.other

import android.net.Uri

object AdUtils {

    private val AD_HOSTS = arrayOf("eastday.com","autohome.com")

    @JvmStatic
    fun showBannerAd(url:String?):Boolean{
        url?:return false

        kotlin.runCatching {
            val host = Uri.parse(url).host?:return false


            AD_HOSTS.forEach {

                if (host.contains(it)){

                    return true
                }

            }
        }

        return false
    }

}